module.exports = api => {
  const isDevelopment = api.env('development');
  return {
    presets: ['@babel/preset-env', '@babel/preset-react'],
    plugins: [isDevelopment && 'react-refresh/babel'].filter(Boolean)
  };
};
